@extends('admin.layout.index')
@section('content')
    @include('admin.layout.breadcrumb')
    <div class="wrapper wrapper-content animated fadeInRight" >
        <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>列表</h5>
                            <div class="ibox-tools">
                                <a class="collapse-link">
                                    <i class="fa fa-chevron-up"></i>
                                </a>
                                <a class="close-link">
                                    <i class="fa fa-times"></i>
                                </a>
                            </div>
                        </div>
                        <div class="ibox-content">
                            <div class="row">
                                <div class="col-sm-4 m-b-xs">
                                </div>
                                <div class="col-sm-8 text-right">
                                    @if (Helper::checkPerm('manager/add'))
                                    <a type="button" class="btn btn-sm btn-primary"  href="{{ asset('manager/add') }}"><i class="glyphicon glyphicon-plus"></i>添加</a>
                                    @endif
                                </div>
                            </div>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <th class="sorting" >ID</th>
                                        <th class="sorting" >手机</th>
                                        <th class="sorting" >角色名称</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    @if (!empty(count($result['member_list'])))
                                    @foreach($result['member_list'] as $k => $v)
                                    <tr class="ng-cloak" >
                                        <td>{{ $v->id }}</td>
                                        <td>{{ $v->mobile }}</td>
                                        <td>{{ $v->groupname }}</td>
                                        <td>@if (Helper::checkPerm('manager/edit'))<a href="{{ asset('manager/edit?id='.$v->id) }}" ><i class="fa fa-edit text-navy">修改</i></a>&nbsp;&nbsp;@endif @if (Helper::checkPerm('manager/del'))<a href="{{ asset('manager/del?id='.$v->id) }}" ><i class="fa fa-times text-danger">删除</i></a>@endif</td>
                                    </tr>
                                    @endforeach
                                    @endif
                                    </tbody>
                                </table>
                            </div>
                            <div class="row">
                                <div class="col-sm-4">
                                    
                                </div>
                                <div class="col-sm-8">
                                    <div id="editable_paginate" class="dataTables_paginate paging_simple_numbers">
                                        {{ $result['member_list']->render() }}
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
    </div>

@endsection

@section('css')
<link href="{{ Config::get('website.storage_url') }}/admin/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
@endsection